package com.metro.activation.common.utils;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

public class PropertiesUtil {
	
	public static Properties getProperties(String filePath) {
		Properties prop = new Properties();
		InputStream is = PropertiesUtil.class.getClassLoader().getResourceAsStream(filePath);
		BufferedReader bf = new BufferedReader(new InputStreamReader(is));
		if(is!=null) {
			try {
				prop.load(bf);
			} catch (IOException e) {
				e.printStackTrace();
			} finally {
				try {
					is.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		return prop;
	}
}